home *** CD-ROM | disk | FTP | other *** search
/ SGI Enlighten DSM 1.1 / SGI EnlightenDSM 1.1.iso / extra / enl_dump.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1998-06-30  |  1KB  |  52 lines

  1. #!/bin/sh
  2. #
  3. # Script: enl_dump.sh
  4. #
  5. # This script dumps the contents of the enlighten database tables
  6. # to flat files.
  7. # To use this script:
  8. # 1. It must be run by user "dbenl"
  9. # 2. There must not be any open connections to the database; therefore, the EMD
  10. #    should not be running. To ensure that no events data is lost, PEP
  11. #    should not be running either. The events daemons will cache data until
  12. #    PEP is reachable again. PEP does not cache data.
  13. # (c) 1996 ENlighten Software Solutions, Inc.
  14. # All Rights Reserved.
  15. #
  16.  
  17.  
  18.  
  19.  
  20. echo "This script will dump the contents of ENlighten's Informix SE database" 
  21. echo "tables to flat files so that the data may be imported at a later time."
  22. echo ""
  23. echo "Enter the full path name of a directory to hold ENlighten data"
  24. echo "or enter q to quit:"
  25.  
  26. while true
  27. do
  28.     read outdir
  29.  
  30.     if [ "$outdir" = "q" -o "$outdir" = "Q" ] ; then
  31.         exit 1
  32.     fi
  33.  
  34.     if [ ! "$outdir" ] ; then
  35.         echo "Enter the full path name of a directory to hold ENlighten data"
  36.         echo "or enter q to quit:"
  37.     elif [ ! -d "$outdir" ] ; then
  38.         echo ""
  39.         echo "The directory $outdir does not exist. Re-enter or"
  40.         echo "enter q to quit:"
  41.     else
  42.         break
  43.     fi
  44. done
  45.  
  46. echo "Exporting data to $outdir/enlighten.exp..."
  47.  
  48. dbexport -c -q -o $outdir enlighten
  49.  
  50.  
  51.